//
//  FQDFeedCacheItem.h
//  FakeQDaily
//
//  Created by mewxiv on 8/18/16.
//  Copyright © 2016 Xensius. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface FQDFeedCacheItem : NSObject

// 根据cacheId获取Cache，内部会根据cacheId生成数据库的表名
+ (instancetype)cacheWithIdentifier:(NSString *)cacheId;
- (instancetype)initWithIdentifier:(NSString *)cacheId;

// 缓存服务器返回feeds数据，feedId用于子类别分类
- (void)cacheFeeds:(NSDictionary *)feedsResponse feedId:(NSString *)feedId cursorKey:(NSString *)cursorKey;
// 从数据库加载feeds数据返回，feedId用于子类别分类
- (void)loadFeedsFromCache:(NSString *)feedId cursorKey:(NSString *)cursorKey completion:(void (^)(id responseObject))completion;
// 判断是否有对feeds缓存，feedId用于子类别分类
- (BOOL)hasCacheForFeedId:(NSString *)feedId cursorKey:(NSString *)cursorKey;

@end
